
# generate figure E1

# load packages
library(rio) # load data
library(tidyverse) # data manipulation
library(ggpubr) # combine different plots

# set working directory
setwd("~/replication_files/")

# call R file that estimates models 
source("05_generate_tab1.R")
# note that you need to change the working directory in the source file as well

plot3 <- plot(fect1, type = "equiv", main = "(a) Treatment: Consultation Promotes Natural Resource Governance", 
              ylab = "Effect on the Probability of Policy Passage",
              cex.legend = 0.6, cex.text = 0.8, ylim = c(-0.1,0.1), stats = c("equiv.p")) + theme_classic() +
  theme(plot.title = element_text(face="bold"),legend.position="bottom")

plot4 <- plot(fect2, type = "equiv", main = "(b) Treatment: Consultation Uses Natural Resource Terms", 
              ylab = "Effect on the Probability of Policy Passage",
              cex.legend = 0.6, cex.text = 0.8, ylim = c(-0.1,0.1), stats = c("equiv.p")) + theme_classic() +
  theme(plot.title = element_text(face="bold"),legend.position="bottom")

ggarrange(plot3,plot4, ncol = 2) %>%
  ggexport(filename = "figures/figE1.pdf", width = 14, height = 5)
